package com.ys.erp.stage_mall_service.bean.condition;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ys.erp.stage_mall_service.bean.dto.KingKongCateAndGoodsDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import lombok.NonNull;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author minamiyama
 * @date 2025/5/16 10:54
 */
@Data
@Schema(description = "商城金刚区配置相关请求对象")
public class KingKongConfigCondition {


    @Schema(description = "添加商城金刚区配置")
    @Data
    public static class AddOrUpdateKingKongConfigCon {

        @Schema(description = "id")
        private Long id;

        @Schema(description = "标题")
        private String title;

        @Schema(description = "副标题")
        private String subTitle;

        @Schema(description = "图标")
        private String icon;

        /**
         * 背景图片
         */
        @Schema(description = "背景图片")
        private String backgroundImage;

        @Schema(description = "类型")
        @NotBlank(message = "类型不能为空")
        private String type;

        @Schema(description = "排序")
        private Integer sort;

        @Schema
        @NotBlank(message = "商品设置方式不能为空")
        private String goodsSettingType;

        @Schema(description = "商品品牌id集合")
        private List<Long> brandIdList;

        @Schema(description = "分类商品集合")
        private List<DisArea> disAreas;

        @Schema(description = "商品菜单集合")
        private List<GoodsMenu> goodsMenus;

    }


    @Data
    @Schema(description = "金刚区商品展示区")
    public static class DisArea {
        @Schema(description = "区域名称")
        private String name;
        @Schema(description = "商品信息集合")
        private List<GoodsInfo> goodsList;
    }


    @Data
    @Schema(description = "金刚区商品菜单")
    public static class GoodsMenu {

        @Schema(description = "菜单名称")
        private String menuName;

        @Schema(description = "是否置顶")
        private Integer isSticky;

    }

    @Data
    @Schema(description = "金刚区商品")
    public static class GoodsInfo {

        @Schema(description = "商品id")
        private Long goodsId;

        @Schema(description = "商品品牌")
        private String brandName;

        @Schema(description = "商品图片")
        private String goodsImg;

        @Schema(description = "商品名称")
        private String goodsName;

        @Schema(description = "商品价格")
        private String goodsPrice;

        @Schema(description = "幺币抵扣率")
        private String ysCoinDiscount;

        @Schema(description = "商品发货方式")
        private String sendGoodsMethod;

        @Schema(description = "商品库存")
        private Integer stock;

        @Schema(description = "商品分类名称")
        private String cateName;

        @Schema(description = "是否主区域显示")
        private Integer isMainAreaDis;
    }

}
